<?php
/**
* @version   $Id: toolbar.scribblemaps.html.php 4 2010-10-05 09:23:50Z edo888 $
* @package   Scribble Maps
* @copyright Copyright (C) 2010 Edvard Ananyan. All rights reserved.
* @license   GNU/GPL, see LICENSE.php
*/

defined('_JEXEC') or die('Restricted access');

class TOOLBAR_ScribbleMaps {

    function _EDIT($cid)    {
        $cid = JRequest::getVar('cid',array(0));

        $text = ( $cid[0] ? JText::_( 'Edit' ) : JText::_( 'New' ) );

        JToolBarHelper::title(JText::_('Scribble Maps').': <small><small>[ ' . $text . ' ]</small></small>');
        JToolBarHelper::save();
        if($text !== JText::_('New'))
            JToolBarHelper::apply();
        if($cid[0])
            JToolBarHelper::cancel('cancel', 'Close');
        else
            JToolBarHelper::cancel();

        JToolBarHelper::help('screen.ScribbleMaps.new', true);
    }

    function _DEFAULT() {
        JToolBarHelper::title(JText::_('Scribble Maps'));
        JToolBarHelper::addNewX();
        JToolBarHelper::editListX();
        JToolBarHelper::deleteList();
        JToolBarHelper::help('screen.ScribbleMaps', true);
    }
}